<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Pepr3D: D:/Home/MFF/1-Mgr/projekt/pepr3d/src/commands/CmdColorManager.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="pepr3d_icon.svg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Pepr3D
   &#160;<span id="projectnumber">v1.0</span>
   </div>
   <div id="projectbrief">Pepr3D is a 3D graphics editor designed for FDM printing</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('_cmd_color_manager_8h_source.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">CmdColorManager.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &quot;glm/glm.hpp&quot;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &quot;commands/Command.h&quot;</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &quot;geometry/Geometry.h&quot;</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno"><a class="line" href="namespacepepr3d.html">    9</a></span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacepepr3d.html">pepr3d</a> {</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div><div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_cmd_color_manager_change_color.html">   12</a></span>&#160;<span class="keyword">class </span><a class="code" href="classpepr3d_1_1_cmd_color_manager_change_color.html">CmdColorManagerChangeColor</a> : <span class="keyword">public</span> <a class="code" href="classpepr3d_1_1_command_base.html">CommandBase</a>&lt;Geometry&gt; {</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;   <span class="keyword">public</span>:</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;    <a class="code" href="classpepr3d_1_1_cmd_color_manager_change_color.html">CmdColorManagerChangeColor</a>(<span class="keywordtype">size_t</span> colorIdx, glm::vec4 color)</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;        : <a class="code" href="classpepr3d_1_1_command_base.html#aa4644cac610c68ac671fbf04af61186f">CommandBase</a>(<span class="keyword">false</span>, <span class="keyword">true</span>), mColorIdx(colorIdx), mColor(color) {}</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_cmd_color_manager_change_color.html#a1d7bdcdb55b06f6829d320c8262e4ff6">   17</a></span>&#160;    std::string_view <a class="code" href="classpepr3d_1_1_cmd_color_manager_change_color.html#a1d7bdcdb55b06f6829d320c8262e4ff6">getDescription</a>()<span class="keyword"> const override </span>{</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;        <span class="keywordflow">return</span> <span class="stringliteral">&quot;Change a color in the palette&quot;</span>;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;    }</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;   <span class="keyword">protected</span>:</div><div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_cmd_color_manager_change_color.html#a6a4258a4f2c7c7f4981c566e103e92fd">   22</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_cmd_color_manager_change_color.html#a6a4258a4f2c7c7f4981c566e103e92fd">run</a>(<a class="code" href="classpepr3d_1_1_geometry.html">Geometry</a>&amp; target)<span class="keyword"> const override </span>{</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;        target.getColorManager().<a class="code" href="classpepr3d_1_1_color_manager.html#a3f11321a8da932e4bf9f7d9a83ecc7f1">setColor</a>(mColorIdx, mColor);</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    }</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_cmd_color_manager_change_color.html#a0c77133a022d16d1aa55ba477dade531">   26</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classpepr3d_1_1_cmd_color_manager_change_color.html#a0c77133a022d16d1aa55ba477dade531">joinCommand</a>(<span class="keyword">const</span> <a class="code" href="classpepr3d_1_1_command_base.html">CommandBase</a>&amp; otherBase)<span class="keyword"> override </span>{</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;        <span class="keyword">const</span> <span class="keyword">auto</span>* other = dynamic_cast&lt;const CmdColorManagerChangeColor*&gt;(&amp;otherBase);</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;        <span class="keywordflow">if</span>(other) {</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;            <span class="comment">// Keep the newer color if we change the same slot</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;            <span class="keywordflow">if</span>(mColorIdx == other-&gt;mColorIdx) {</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;                mColor = other-&gt;mColor;</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;                <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;            } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;                <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;            }</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;        } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        }</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    }</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <span class="keywordtype">size_t</span> mColorIdx;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    glm::vec4 mColor;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;};</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;</div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_cmd_color_manager_swap_colors.html">   47</a></span>&#160;<span class="keyword">class </span><a class="code" href="classpepr3d_1_1_cmd_color_manager_swap_colors.html">CmdColorManagerSwapColors</a> : <span class="keyword">public</span> <a class="code" href="classpepr3d_1_1_command_base.html">CommandBase</a>&lt;Geometry&gt; {</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;   <span class="keyword">public</span>:</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <a class="code" href="classpepr3d_1_1_cmd_color_manager_swap_colors.html">CmdColorManagerSwapColors</a>(<span class="keywordtype">size_t</span> color1Idx, <span class="keywordtype">size_t</span> color2Idx)</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        : <a class="code" href="classpepr3d_1_1_command_base.html#aa4644cac610c68ac671fbf04af61186f">CommandBase</a>(<span class="keyword">false</span>, <span class="keyword">false</span>), mColor1Idx(color1Idx), mColor2Idx(color2Idx) {}</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_cmd_color_manager_swap_colors.html#abec8b759af2a20f032491ec55a6e36a4">   52</a></span>&#160;    std::string_view <a class="code" href="classpepr3d_1_1_cmd_color_manager_swap_colors.html#abec8b759af2a20f032491ec55a6e36a4">getDescription</a>()<span class="keyword"> const override </span>{</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;        <span class="keywordflow">return</span> <span class="stringliteral">&quot;Swap 2 colors in the palette&quot;</span>;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    }</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;   <span class="keyword">protected</span>:</div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_cmd_color_manager_swap_colors.html#a8b2d71615f5391bfa047ab34ac81c08b">   57</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_cmd_color_manager_swap_colors.html#a8b2d71615f5391bfa047ab34ac81c08b">run</a>(<a class="code" href="classpepr3d_1_1_geometry.html">Geometry</a>&amp; target)<span class="keyword"> const override </span>{</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        <a class="code" href="classpepr3d_1_1_color_manager.html">ColorManager</a>&amp; colorManager = target.getColorManager();</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        <span class="keyword">const</span> glm::vec4 temp = colorManager.<a class="code" href="classpepr3d_1_1_color_manager.html#aa6453cf533bb4bb251203bd599c48321">getColor</a>(mColor1Idx);</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        colorManager.<a class="code" href="classpepr3d_1_1_color_manager.html#a3f11321a8da932e4bf9f7d9a83ecc7f1">setColor</a>(mColor1Idx, colorManager.<a class="code" href="classpepr3d_1_1_color_manager.html#aa6453cf533bb4bb251203bd599c48321">getColor</a>(mColor2Idx));</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        colorManager.<a class="code" href="classpepr3d_1_1_color_manager.html#a3f11321a8da932e4bf9f7d9a83ecc7f1">setColor</a>(mColor2Idx, temp);</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    }</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    <span class="keywordtype">size_t</span> mColor1Idx;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    <span class="keywordtype">size_t</span> mColor2Idx;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;};</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;</div><div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_cmd_color_manager_reorder_colors.html">   69</a></span>&#160;<span class="keyword">class </span><a class="code" href="classpepr3d_1_1_cmd_color_manager_reorder_colors.html">CmdColorManagerReorderColors</a> : <span class="keyword">public</span> <a class="code" href="classpepr3d_1_1_command_base.html">CommandBase</a>&lt;Geometry&gt; {</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;   <span class="keyword">public</span>:</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <a class="code" href="classpepr3d_1_1_cmd_color_manager_reorder_colors.html">CmdColorManagerReorderColors</a>(<span class="keywordtype">size_t</span> color1Idx, <span class="keywordtype">size_t</span> color2Idx)</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;        : <a class="code" href="classpepr3d_1_1_command_base.html#aa4644cac610c68ac671fbf04af61186f">CommandBase</a>(<span class="keyword">false</span>, <span class="keyword">false</span>), mColor1Idx(color1Idx), mColor2Idx(color2Idx) {}</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_cmd_color_manager_reorder_colors.html#a165bc96ee062a1f4f35f3d34b6039fe1">   74</a></span>&#160;    std::string_view <a class="code" href="classpepr3d_1_1_cmd_color_manager_reorder_colors.html#a165bc96ee062a1f4f35f3d34b6039fe1">getDescription</a>()<span class="keyword"> const override </span>{</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        <span class="keywordflow">return</span> <span class="stringliteral">&quot;Reorder 2 colors in the palette&quot;</span>;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    }</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;   <span class="keyword">protected</span>:</div><div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_cmd_color_manager_reorder_colors.html#a10fd4859ee24045dab33287150fb2573">   79</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_cmd_color_manager_reorder_colors.html#a10fd4859ee24045dab33287150fb2573">run</a>(<a class="code" href="classpepr3d_1_1_geometry.html">Geometry</a>&amp; target)<span class="keyword"> const override </span>{</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;        <span class="comment">// the beginning is the same as in color swap:</span></div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        <a class="code" href="classpepr3d_1_1_color_manager.html">ColorManager</a>&amp; colorManager = target.getColorManager();</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;        <span class="keyword">const</span> glm::vec4 temp = colorManager.<a class="code" href="classpepr3d_1_1_color_manager.html#aa6453cf533bb4bb251203bd599c48321">getColor</a>(mColor1Idx);</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        colorManager.<a class="code" href="classpepr3d_1_1_color_manager.html#a3f11321a8da932e4bf9f7d9a83ecc7f1">setColor</a>(mColor1Idx, colorManager.<a class="code" href="classpepr3d_1_1_color_manager.html#aa6453cf533bb4bb251203bd599c48321">getColor</a>(mColor2Idx));</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;        colorManager.<a class="code" href="classpepr3d_1_1_color_manager.html#a3f11321a8da932e4bf9f7d9a83ecc7f1">setColor</a>(mColor2Idx, temp);</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        <span class="comment">// unlike in color swap, we need to preserve model coloring, i.e., swap color IDs in the model:</span></div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;        <span class="keyword">const</span> <span class="keywordtype">size_t</span> color1Idx = mColor1Idx;  <span class="comment">// Local copy to pass to lambda</span></div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        <span class="keyword">const</span> <span class="keywordtype">size_t</span> color2Idx = mColor2Idx;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;        target.<a class="code" href="classpepr3d_1_1_geometry.html#ae6d2ae86fca37592a5dbb93784ca4ef0">changeColorIds</a>([color1Idx, color2Idx](<span class="keywordtype">size_t</span> origColor) {</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;            <span class="keywordflow">if</span>(origColor == color1Idx) {</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;                <span class="keywordflow">return</span> color2Idx;</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;            }</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;            <span class="keywordflow">if</span>(origColor == color2Idx) {</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;                <span class="keywordflow">return</span> color1Idx;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;            }</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;            <span class="keywordflow">return</span> origColor;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        });</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    }</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <span class="keywordtype">size_t</span> mColor1Idx;</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <span class="keywordtype">size_t</span> mColor2Idx;</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;};</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div><div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_cmd_color_manager_remove_color.html">  105</a></span>&#160;<span class="keyword">class </span><a class="code" href="classpepr3d_1_1_cmd_color_manager_remove_color.html">CmdColorManagerRemoveColor</a> : <span class="keyword">public</span> <a class="code" href="classpepr3d_1_1_command_base.html">CommandBase</a>&lt;Geometry&gt; {</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;   <span class="keyword">public</span>:</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    <a class="code" href="classpepr3d_1_1_cmd_color_manager_remove_color.html">CmdColorManagerRemoveColor</a>(<span class="keywordtype">size_t</span> colorIdx) : <a class="code" href="classpepr3d_1_1_command_base.html#aa4644cac610c68ac671fbf04af61186f">CommandBase</a>(<span class="keyword">false</span>, <span class="keyword">false</span>), mColorIdx(colorIdx) {}</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div><div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_cmd_color_manager_remove_color.html#aa43776157afafd9ae0f31a12927525a6">  109</a></span>&#160;    std::string_view <a class="code" href="classpepr3d_1_1_cmd_color_manager_remove_color.html#aa43776157afafd9ae0f31a12927525a6">getDescription</a>()<span class="keyword"> const override </span>{</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;        <span class="keywordflow">return</span> <span class="stringliteral">&quot;Remove a color from the palette&quot;</span>;</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    }</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;   <span class="keyword">protected</span>:</div><div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_cmd_color_manager_remove_color.html#a6e668863ad50cac553cd0ace8dc9dc1b">  114</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_cmd_color_manager_remove_color.html#a6e668863ad50cac553cd0ace8dc9dc1b">run</a>(<a class="code" href="classpepr3d_1_1_geometry.html">Geometry</a>&amp; target)<span class="keyword"> const override </span>{</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        <a class="code" href="classpepr3d_1_1_color_manager.html">ColorManager</a>&amp; colorManager = target.getColorManager();</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        P_ASSERT(mColorIdx + 1 &lt;= colorManager.<a class="code" href="classpepr3d_1_1_color_manager.html#a136ee5ee62632d6537377fccdc5ef9c6">size</a>());</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;        ColorManager::ColorMap&amp; colorMap = colorManager.getColorMap();</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;        colorMap.erase(colorMap.cbegin() + mColorIdx);</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;        <span class="comment">// replace the erased color in the model and shift remaining colors:</span></div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;        P_ASSERT(colorManager.<a class="code" href="classpepr3d_1_1_color_manager.html#a136ee5ee62632d6537377fccdc5ef9c6">size</a>() &gt; 0);</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;        <span class="keyword">const</span> <span class="keywordtype">size_t</span> colorIdx = mColorIdx;  <span class="comment">// Local copy for lambda</span></div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;        target.<a class="code" href="classpepr3d_1_1_geometry.html#ae6d2ae86fca37592a5dbb93784ca4ef0">changeColorIds</a>([colorIdx](<span class="keywordtype">size_t</span> originalColor) {</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;            <span class="keywordflow">if</span>(originalColor == colorIdx) {</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;                <span class="keywordflow">return</span> static_cast&lt;size_t&gt;(0);</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(originalColor &gt; colorIdx) {</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;                <span class="keywordflow">return</span> originalColor - 1;</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;            }</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;            <span class="keywordflow">return</span> originalColor;</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;        });</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;        <span class="comment">// set new active (user selected) color:</span></div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;        <span class="keywordflow">if</span>(colorManager.<a class="code" href="classpepr3d_1_1_color_manager.html#a3532df102b706a03bc0e23401c457e4f">getActiveColorIndex</a>() == mColorIdx) {</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;            colorManager.<a class="code" href="classpepr3d_1_1_color_manager.html#a81d621c28e948d1b3159dde1bcb73aea">setActiveColorIndex</a>(0);</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;        }</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    }</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    <span class="keywordtype">size_t</span> mColorIdx;</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;};</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;</div><div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_cmd_color_manager_add_color.html">  142</a></span>&#160;<span class="keyword">class </span><a class="code" href="classpepr3d_1_1_cmd_color_manager_add_color.html">CmdColorManagerAddColor</a> : <span class="keyword">public</span> <a class="code" href="classpepr3d_1_1_command_base.html">CommandBase</a>&lt;Geometry&gt; {</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;   <span class="keyword">public</span>:</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    <a class="code" href="classpepr3d_1_1_cmd_color_manager_add_color.html">CmdColorManagerAddColor</a>() : <a class="code" href="classpepr3d_1_1_command_base.html#aa4644cac610c68ac671fbf04af61186f">CommandBase</a>(<span class="keyword">false</span>, <span class="keyword">false</span>) {}</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;</div><div class="line"><a name="l00146"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_cmd_color_manager_add_color.html#adbabbf01c7650eb626675f0611806089">  146</a></span>&#160;    std::string_view <a class="code" href="classpepr3d_1_1_cmd_color_manager_add_color.html#adbabbf01c7650eb626675f0611806089">getDescription</a>()<span class="keyword"> const override </span>{</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;        <span class="keywordflow">return</span> <span class="stringliteral">&quot;Add a new color to the palette&quot;</span>;</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    }</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;   <span class="keyword">protected</span>:</div><div class="line"><a name="l00151"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_cmd_color_manager_add_color.html#a900866856f9b243902938f0b6534e713">  151</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_cmd_color_manager_add_color.html#a900866856f9b243902938f0b6534e713">run</a>(<a class="code" href="classpepr3d_1_1_geometry.html">Geometry</a>&amp; target)<span class="keyword"> const override </span>{</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;        <a class="code" href="classpepr3d_1_1_color_manager.html">ColorManager</a>&amp; colorManager = target.getColorManager();</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;        P_ASSERT(colorManager.<a class="code" href="classpepr3d_1_1_color_manager.html#a136ee5ee62632d6537377fccdc5ef9c6">size</a>() &gt; 0);</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;        std::random_device rd;   <span class="comment">// Will be used to obtain a seed for the random number engine</span></div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;        std::mt19937 gen(rd());  <span class="comment">// Standard mersenne_twister_engine seeded with rd()</span></div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;        std::uniform_real_distribution&lt;&gt; dis(0.0, 1.0);</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;        colorManager.<a class="code" href="classpepr3d_1_1_color_manager.html#a5ddc4ed221439f8b744b6d85b89127b3">addColor</a>(glm::vec4(dis(gen), dis(gen), dis(gen), 1.0f));</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    }</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;};</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;</div><div class="line"><a name="l00162"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_cmd_color_manager_reset_colors.html">  162</a></span>&#160;<span class="keyword">class </span><a class="code" href="classpepr3d_1_1_cmd_color_manager_reset_colors.html">CmdColorManagerResetColors</a> : <span class="keyword">public</span> <a class="code" href="classpepr3d_1_1_command_base.html">CommandBase</a>&lt;Geometry&gt; {</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;   <span class="keyword">public</span>:</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    <a class="code" href="classpepr3d_1_1_cmd_color_manager_reset_colors.html">CmdColorManagerResetColors</a>() : <a class="code" href="classpepr3d_1_1_command_base.html#aa4644cac610c68ac671fbf04af61186f">CommandBase</a>(<span class="keyword">false</span>, <span class="keyword">false</span>) {}</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;</div><div class="line"><a name="l00166"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_cmd_color_manager_reset_colors.html#a79a788c0d947780c54e94ceb0eeafcfb">  166</a></span>&#160;    std::string_view <a class="code" href="classpepr3d_1_1_cmd_color_manager_reset_colors.html#a79a788c0d947780c54e94ceb0eeafcfb">getDescription</a>()<span class="keyword"> const override </span>{</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;        <span class="keywordflow">return</span> <span class="stringliteral">&quot;Reset all colors to default&quot;</span>;</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;    }</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;   <span class="keyword">protected</span>:</div><div class="line"><a name="l00171"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_cmd_color_manager_reset_colors.html#a95da87e8ba7e901470c93b51f199f05a">  171</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_cmd_color_manager_reset_colors.html#a95da87e8ba7e901470c93b51f199f05a">run</a>(<a class="code" href="classpepr3d_1_1_geometry.html">Geometry</a>&amp; target)<span class="keyword"> const override </span>{</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;        <a class="code" href="classpepr3d_1_1_color_manager.html">ColorManager</a>&amp; colorManager = target.getColorManager();</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;        colorManager = <a class="code" href="classpepr3d_1_1_color_manager.html">ColorManager</a>();</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;        <span class="keyword">const</span> <span class="keywordtype">size_t</span> maxColorId = colorManager.<a class="code" href="classpepr3d_1_1_color_manager.html#a136ee5ee62632d6537377fccdc5ef9c6">size</a>() - 1;</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;        target.<a class="code" href="classpepr3d_1_1_geometry.html#ae6d2ae86fca37592a5dbb93784ca4ef0">changeColorIds</a>([maxColorId](<span class="keywordtype">size_t</span> origColor) {</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;            <span class="keywordflow">if</span>(origColor &gt; maxColorId) {</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;                <span class="keywordflow">return</span> maxColorId;</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;            } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;                <span class="keywordflow">return</span> origColor;</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;            }</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;        });</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;    }</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;};</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;}  <span class="comment">// namespace pepr3d</span></div><div class="ttc" id="classpepr3d_1_1_color_manager_html_a3f11321a8da932e4bf9f7d9a83ecc7f1"><div class="ttname"><a href="classpepr3d_1_1_color_manager.html#a3f11321a8da932e4bf9f7d9a83ecc7f1">pepr3d::ColorManager::setColor</a></div><div class="ttdeci">void setColor(const size_t i, const glm::vec4 newColor)</div><div class="ttdoc">Set the i-th color to a new color.</div><div class="ttdef"><b>Definition:</b> ColorManager.h:76</div></div>
<div class="ttc" id="classpepr3d_1_1_cmd_color_manager_remove_color_html"><div class="ttname"><a href="classpepr3d_1_1_cmd_color_manager_remove_color.html">pepr3d::CmdColorManagerRemoveColor</a></div><div class="ttdoc">Command that removes a color from the palette, which replaces it in the Geometry with the first color...</div><div class="ttdef"><b>Definition:</b> CmdColorManager.h:105</div></div>
<div class="ttc" id="classpepr3d_1_1_cmd_color_manager_change_color_html_a0c77133a022d16d1aa55ba477dade531"><div class="ttname"><a href="classpepr3d_1_1_cmd_color_manager_change_color.html#a0c77133a022d16d1aa55ba477dade531">pepr3d::CmdColorManagerChangeColor::joinCommand</a></div><div class="ttdeci">bool joinCommand(const CommandBase &amp;otherBase) override</div><div class="ttdoc">Join this command with other command of the same commandType, uniting both commands into this command...</div><div class="ttdef"><b>Definition:</b> CmdColorManager.h:26</div></div>
<div class="ttc" id="classpepr3d_1_1_cmd_color_manager_change_color_html"><div class="ttname"><a href="classpepr3d_1_1_cmd_color_manager_change_color.html">pepr3d::CmdColorManagerChangeColor</a></div><div class="ttdoc">Command that changes a color in the palette.</div><div class="ttdef"><b>Definition:</b> CmdColorManager.h:12</div></div>
<div class="ttc" id="classpepr3d_1_1_cmd_color_manager_remove_color_html_a6e668863ad50cac553cd0ace8dc9dc1b"><div class="ttname"><a href="classpepr3d_1_1_cmd_color_manager_remove_color.html#a6e668863ad50cac553cd0ace8dc9dc1b">pepr3d::CmdColorManagerRemoveColor::run</a></div><div class="ttdeci">void run(Geometry &amp;target) const override</div><div class="ttdoc">Run the command, applying the modifications to the target.</div><div class="ttdef"><b>Definition:</b> CmdColorManager.h:114</div></div>
<div class="ttc" id="classpepr3d_1_1_cmd_color_manager_swap_colors_html_a8b2d71615f5391bfa047ab34ac81c08b"><div class="ttname"><a href="classpepr3d_1_1_cmd_color_manager_swap_colors.html#a8b2d71615f5391bfa047ab34ac81c08b">pepr3d::CmdColorManagerSwapColors::run</a></div><div class="ttdeci">void run(Geometry &amp;target) const override</div><div class="ttdoc">Run the command, applying the modifications to the target.</div><div class="ttdef"><b>Definition:</b> CmdColorManager.h:57</div></div>
<div class="ttc" id="namespacepepr3d_html"><div class="ttname"><a href="namespacepepr3d.html">pepr3d</a></div><div class="ttdoc">Fix for CGAL bugs in polygon with holes verification Contained in CGAL PR #3688, likely to be in 4....</div><div class="ttdef"><b>Definition:</b> CmdColorManager.h:9</div></div>
<div class="ttc" id="classpepr3d_1_1_cmd_color_manager_add_color_html_adbabbf01c7650eb626675f0611806089"><div class="ttname"><a href="classpepr3d_1_1_cmd_color_manager_add_color.html#adbabbf01c7650eb626675f0611806089">pepr3d::CmdColorManagerAddColor::getDescription</a></div><div class="ttdeci">std::string_view getDescription() const override</div><div class="ttdoc">Get description of the command.</div><div class="ttdef"><b>Definition:</b> CmdColorManager.h:146</div></div>
<div class="ttc" id="classpepr3d_1_1_cmd_color_manager_add_color_html"><div class="ttname"><a href="classpepr3d_1_1_cmd_color_manager_add_color.html">pepr3d::CmdColorManagerAddColor</a></div><div class="ttdoc">Command that adds a new color to the palette.</div><div class="ttdef"><b>Definition:</b> CmdColorManager.h:142</div></div>
<div class="ttc" id="classpepr3d_1_1_cmd_color_manager_reset_colors_html"><div class="ttname"><a href="classpepr3d_1_1_cmd_color_manager_reset_colors.html">pepr3d::CmdColorManagerResetColors</a></div><div class="ttdoc">Command that resets all colors of the palette to the default 4 colors.</div><div class="ttdef"><b>Definition:</b> CmdColorManager.h:162</div></div>
<div class="ttc" id="classpepr3d_1_1_color_manager_html_aa6453cf533bb4bb251203bd599c48321"><div class="ttname"><a href="classpepr3d_1_1_color_manager.html#aa6453cf533bb4bb251203bd599c48321">pepr3d::ColorManager::getColor</a></div><div class="ttdeci">glm::vec4 getColor(const size_t i) const</div><div class="ttdoc">Return the i-th color.</div><div class="ttdef"><b>Definition:</b> ColorManager.h:47</div></div>
<div class="ttc" id="classpepr3d_1_1_color_manager_html"><div class="ttname"><a href="classpepr3d_1_1_color_manager.html">pepr3d::ColorManager</a></div><div class="ttdoc">Represents a color palette, i.e., all colors and a selected active color.</div><div class="ttdef"><b>Definition:</b> ColorManager.h:16</div></div>
<div class="ttc" id="classpepr3d_1_1_color_manager_html_a81d621c28e948d1b3159dde1bcb73aea"><div class="ttname"><a href="classpepr3d_1_1_color_manager.html#a81d621c28e948d1b3159dde1bcb73aea">pepr3d::ColorManager::setActiveColorIndex</a></div><div class="ttdeci">void setActiveColorIndex(size_t index)</div><div class="ttdoc">Sets index of the currently selected / active color, safely checks boundaries.</div><div class="ttdef"><b>Definition:</b> ColorManager.h:112</div></div>
<div class="ttc" id="classpepr3d_1_1_color_manager_html_a3532df102b706a03bc0e23401c457e4f"><div class="ttname"><a href="classpepr3d_1_1_color_manager.html#a3532df102b706a03bc0e23401c457e4f">pepr3d::ColorManager::getActiveColorIndex</a></div><div class="ttdeci">size_t getActiveColorIndex() const</div><div class="ttdoc">Gets index of the currently selected / active color.</div><div class="ttdef"><b>Definition:</b> ColorManager.h:107</div></div>
<div class="ttc" id="classpepr3d_1_1_cmd_color_manager_remove_color_html_aa43776157afafd9ae0f31a12927525a6"><div class="ttname"><a href="classpepr3d_1_1_cmd_color_manager_remove_color.html#aa43776157afafd9ae0f31a12927525a6">pepr3d::CmdColorManagerRemoveColor::getDescription</a></div><div class="ttdeci">std::string_view getDescription() const override</div><div class="ttdoc">Get description of the command.</div><div class="ttdef"><b>Definition:</b> CmdColorManager.h:109</div></div>
<div class="ttc" id="classpepr3d_1_1_cmd_color_manager_reorder_colors_html"><div class="ttname"><a href="classpepr3d_1_1_cmd_color_manager_reorder_colors.html">pepr3d::CmdColorManagerReorderColors</a></div><div class="ttdoc">Command that reorders 2 colors in the palette, which does not change the colors in the Geometry.</div><div class="ttdef"><b>Definition:</b> CmdColorManager.h:69</div></div>
<div class="ttc" id="classpepr3d_1_1_cmd_color_manager_swap_colors_html_abec8b759af2a20f032491ec55a6e36a4"><div class="ttname"><a href="classpepr3d_1_1_cmd_color_manager_swap_colors.html#abec8b759af2a20f032491ec55a6e36a4">pepr3d::CmdColorManagerSwapColors::getDescription</a></div><div class="ttdeci">std::string_view getDescription() const override</div><div class="ttdoc">Get description of the command.</div><div class="ttdef"><b>Definition:</b> CmdColorManager.h:52</div></div>
<div class="ttc" id="classpepr3d_1_1_cmd_color_manager_add_color_html_a900866856f9b243902938f0b6534e713"><div class="ttname"><a href="classpepr3d_1_1_cmd_color_manager_add_color.html#a900866856f9b243902938f0b6534e713">pepr3d::CmdColorManagerAddColor::run</a></div><div class="ttdeci">void run(Geometry &amp;target) const override</div><div class="ttdoc">Run the command, applying the modifications to the target.</div><div class="ttdef"><b>Definition:</b> CmdColorManager.h:151</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html"><div class="ttname"><a href="classpepr3d_1_1_geometry.html">pepr3d::Geometry</a></div><div class="ttdoc">The whole geometry of a model that the user is painting.</div><div class="ttdef"><b>Definition:</b> Geometry.h:34</div></div>
<div class="ttc" id="classpepr3d_1_1_color_manager_html_a136ee5ee62632d6537377fccdc5ef9c6"><div class="ttname"><a href="classpepr3d_1_1_color_manager.html#a136ee5ee62632d6537377fccdc5ef9c6">pepr3d::ColorManager::size</a></div><div class="ttdeci">size_t size() const</div><div class="ttdoc">Returns the number of currently used colors.</div><div class="ttdef"><b>Definition:</b> ColorManager.h:53</div></div>
<div class="ttc" id="classpepr3d_1_1_cmd_color_manager_reset_colors_html_a95da87e8ba7e901470c93b51f199f05a"><div class="ttname"><a href="classpepr3d_1_1_cmd_color_manager_reset_colors.html#a95da87e8ba7e901470c93b51f199f05a">pepr3d::CmdColorManagerResetColors::run</a></div><div class="ttdeci">void run(Geometry &amp;target) const override</div><div class="ttdoc">Run the command, applying the modifications to the target.</div><div class="ttdef"><b>Definition:</b> CmdColorManager.h:171</div></div>
<div class="ttc" id="classpepr3d_1_1_cmd_color_manager_change_color_html_a6a4258a4f2c7c7f4981c566e103e92fd"><div class="ttname"><a href="classpepr3d_1_1_cmd_color_manager_change_color.html#a6a4258a4f2c7c7f4981c566e103e92fd">pepr3d::CmdColorManagerChangeColor::run</a></div><div class="ttdeci">void run(Geometry &amp;target) const override</div><div class="ttdoc">Run the command, applying the modifications to the target.</div><div class="ttdef"><b>Definition:</b> CmdColorManager.h:22</div></div>
<div class="ttc" id="classpepr3d_1_1_color_manager_html_a5ddc4ed221439f8b744b6d85b89127b3"><div class="ttname"><a href="classpepr3d_1_1_color_manager.html#a5ddc4ed221439f8b744b6d85b89127b3">pepr3d::ColorManager::addColor</a></div><div class="ttdeci">void addColor(const glm::vec4 newColor)</div><div class="ttdoc">Adds a new color if not above limit.</div><div class="ttdef"><b>Definition:</b> ColorManager.h:68</div></div>
<div class="ttc" id="classpepr3d_1_1_command_base_html"><div class="ttname"><a href="classpepr3d_1_1_command_base.html">pepr3d::CommandBase</a></div><div class="ttdoc">CommandBase is a base class for commands representing a single undoable operation....</div><div class="ttdef"><b>Definition:</b> Command.h:10</div></div>
<div class="ttc" id="classpepr3d_1_1_cmd_color_manager_reorder_colors_html_a10fd4859ee24045dab33287150fb2573"><div class="ttname"><a href="classpepr3d_1_1_cmd_color_manager_reorder_colors.html#a10fd4859ee24045dab33287150fb2573">pepr3d::CmdColorManagerReorderColors::run</a></div><div class="ttdeci">void run(Geometry &amp;target) const override</div><div class="ttdoc">Run the command, applying the modifications to the target.</div><div class="ttdef"><b>Definition:</b> CmdColorManager.h:79</div></div>
<div class="ttc" id="classpepr3d_1_1_command_base_html_aa4644cac610c68ac671fbf04af61186f"><div class="ttname"><a href="classpepr3d_1_1_command_base.html#aa4644cac610c68ac671fbf04af61186f">pepr3d::CommandBase&lt; Geometry &gt;::CommandBase</a></div><div class="ttdeci">CommandBase(bool isSlow=false, bool canBeJoined=false)</div><div class="ttdef"><b>Definition:</b> Command.h:19</div></div>
<div class="ttc" id="classpepr3d_1_1_cmd_color_manager_reorder_colors_html_a165bc96ee062a1f4f35f3d34b6039fe1"><div class="ttname"><a href="classpepr3d_1_1_cmd_color_manager_reorder_colors.html#a165bc96ee062a1f4f35f3d34b6039fe1">pepr3d::CmdColorManagerReorderColors::getDescription</a></div><div class="ttdeci">std::string_view getDescription() const override</div><div class="ttdoc">Get description of the command.</div><div class="ttdef"><b>Definition:</b> CmdColorManager.h:74</div></div>
<div class="ttc" id="classpepr3d_1_1_cmd_color_manager_reset_colors_html_a79a788c0d947780c54e94ceb0eeafcfb"><div class="ttname"><a href="classpepr3d_1_1_cmd_color_manager_reset_colors.html#a79a788c0d947780c54e94ceb0eeafcfb">pepr3d::CmdColorManagerResetColors::getDescription</a></div><div class="ttdeci">std::string_view getDescription() const override</div><div class="ttdoc">Get description of the command.</div><div class="ttdef"><b>Definition:</b> CmdColorManager.h:166</div></div>
<div class="ttc" id="classpepr3d_1_1_cmd_color_manager_swap_colors_html"><div class="ttname"><a href="classpepr3d_1_1_cmd_color_manager_swap_colors.html">pepr3d::CmdColorManagerSwapColors</a></div><div class="ttdoc">Command that swaps 2 colors in the palette, which also swaps the colors in the Geometry.</div><div class="ttdef"><b>Definition:</b> CmdColorManager.h:47</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_ae6d2ae86fca37592a5dbb93784ca4ef0"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#ae6d2ae86fca37592a5dbb93784ca4ef0">pepr3d::Geometry::changeColorIds</a></div><div class="ttdeci">void changeColorIds(const ColorFunc &amp;colorFunc)</div><div class="ttdoc">Change all color ID's from one to another.</div><div class="ttdef"><b>Definition:</b> Geometry.h:371</div></div>
<div class="ttc" id="classpepr3d_1_1_cmd_color_manager_change_color_html_a1d7bdcdb55b06f6829d320c8262e4ff6"><div class="ttname"><a href="classpepr3d_1_1_cmd_color_manager_change_color.html#a1d7bdcdb55b06f6829d320c8262e4ff6">pepr3d::CmdColorManagerChangeColor::getDescription</a></div><div class="ttdeci">std::string_view getDescription() const override</div><div class="ttdoc">Get description of the command.</div><div class="ttdef"><b>Definition:</b> CmdColorManager.h:17</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_5e80d29b61c444378a543be4dd1414df.html">commands</a></li><li class="navelem"><b>CmdColorManager.h</b></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
  </ul>
</div>
</body>
</html>
